<?php

namespace Siese\LoginBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;


class LoginFormType extends AbstractType
{
    

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('_username', 'text', array('label' => 'form.username')) // TODO: user can login with email by inhibit the user to enter username
            ->add('_password', 'password', array(
            'label' => 'form.current_password',
            'mapped' => false))
            ->add('captcha','captcha');
    }
    
    
    /**
     * @return string
     */
    public function getName()
    {
        return 'login_form';
    }  
}